package com.zh.factorymode;

import com.zh.factorymode.services.abastract.IClothbound;
import com.zh.factorymode.services.abastract.IDraught;
import com.zh.factorymode.services.method.IFoodFactory;
import com.zh.factorymode.services.method.Impl.BreadFactoryImpl;
import com.zh.factorymode.services.method.Impl.CookyFactoryImpl;
import com.zh.factorymode.services.simple.FoodFactory;
import com.zh.factorymode.services.simple.IFood;
import com.zh.factorymode.services.simple.Impl.BreadImpl;

public class ModeApplication {
//    public static void main(String[] args) {
//        IFood food = new BreadImpl();
//        food.production();
//    }
//    public static void main(String[] args) {
//        IFood food = FoodFactory.build("Cooky");
//        food.production();
//    }
//    public static void main(String[] args) {
//        IFood food = FoodFactory.build(BreadImpl.class);
//        food.production();
//    }
//    public static void main(String[] args) {
//        IFoodFactory foodFactory = null;
//        IFood food = null;
//
//        foodFactory = new BreadFactoryImpl();
//        food = foodFactory.create();
//        food.production();
//
//        foodFactory = new CookyFactoryImpl();
//        food = foodFactory.create();
//        food.production();
//    }
    public static void main(String[] args) {
        IFoodFactory foodFactory = null;
        IDraught draught = null;
        IClothbound clothbound = null;

        foodFactory = new BreadFactoryImpl();
        draught = foodFactory.createDraught();
        draught.location();

        foodFactory = new CookyFactoryImpl();
        clothbound = foodFactory.createClothbound();
        clothbound.brand();
    }
}
